import fetch from 'common/src/utils/fetch';

let api = {
    // 数据分权，选择年级查专业大类
    getMajorByGradeAndTid(data) {
        return fetch({
            url: '/api/majorservice/classPrivilege/queryMajorByGidAndTid',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        });
    },
    // 查综合成绩详情
    getResultDetail(gradeId, studentId) {
        return fetch({
            url: '/api/majorservice/interResultRank/classResultDetail',
            method: 'post',
            params: {
                gradeId: gradeId,
                studentId: studentId
            },
            headers: {
                'Content-Type': 'application/json'
            },
        });
    },
    // 导出
    export (data) {
        return fetch({
            url: '/api/majorservice/interResultRank/classExport',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        });
    },
    getReportStatus(key) {
        return fetch({
            url: `/api/majorservice/common/exportExcelResult/${key}`,
            method: 'get'
        });
    }
};
export default api;
